<?php
/**
 * CreateTime: 2022/10/12 10:57
 */

namespace App\Http\Requests\Client;

use App\Http\Requests\BaseRequests;

class AddCreditClientXpPost  extends BaseRequests
{

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'credit_client_type' => "required",
            'credit_client_evaluation_info' => "required",
            'credit_client_evaluation_rating' => "required",
            'credit_client_level' => "required",
            'credit_client_net_assets' => "required",
            'credit_client_registered_capital' => "required",
            'credit_client_quota_max' => "required",
            'credit_client_third_party_quota' => "required",
            'credit_client_total_quota' => "required",
            'register_asset_ratio_wan' => "required",
            'net_asset_ratio_wan' => "required",
        ];
    }

    public function messages()
    {
        return [
            'credit_client_type.required' => "客户类别不能为空",
            'credit_client_evaluation_info.required' => "信用评价表信息不能为空",
            'credit_client_evaluation_rating.required' => "总得分不能为空",
            'credit_client_level.required' => "信用级别不能为空",
            'credit_client_net_assets.required' => "净资产不能为空",
            'credit_client_registered_capital.required' => "注册资本不能为空",
            'credit_client_quota_max.required' => "额度上限不能为空",
            'credit_client_third_party_quota.required' => "第三方信用评价额度不能为空",
            'credit_client_total_quota.required' => "客户最终信用额度不能为空",
            'register_asset_ratio_wan.required' => "净资产*信用级别系数不能为空",
            'net_asset_ratio_wan.required' => "信用级别系数不能为空",
        ];
    }
}